package com.mini.framework.communicate.mina.protocol;

import org.apache.mina.core.buffer.IoBuffer;

public interface Encoder {
	
	/**
	 * 获取该编码器所对应的对象.
	 * @return
	 */
	public Class<? extends Msg> getMsgType();
	
	/**
	 * 对象编码成字节.
	 * 
	 * @param msg
	 * @return
	 */
	public IoBuffer encode(Msg msg);

}
